<template>
    <div class="wrapper">
        <div class="coverWrapper">
            <img :src="coverUrl ? coverUrl : 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F8ce0076e7fbc3d92f92d930d9c8381ade0200eb144b82-M4yYvd_fw236&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1657908060&t=e1232a533a021176fc2ab0f23aad8e17'"
                alt="title">
            <van-icon name="play" class='playIcon' />
        </div>
        <div class="title">{{ title ? title : 'hello world derbuder!' }}</div>
        <div class="bottom">
            <div class="avatarWrapper">
                <img :src="avatarUrl ? avatarUrl : 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2F8ce0076e7fbc3d92f92d930d9c8381ade0200eb144b82-M4yYvd_fw236&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1657908060&t=e1232a533a021176fc2ab0f23aad8e17'"
                    alt="avatarUrl" />
                <div>{{ nickname ? nickname : 'nick' }}</div>
            </div>
            <div class="praisedWrapper">
                <van-icon name="good-job" />{{ praisedCount ? praisedCount : 200 }}
            </div>
        </div>
    </div>
</template>

<script setup>
/* eslint-disable */

import { defineProps } from "vue";
const props = defineProps({
    praisedCount: Number,
    avatarUrl: String,
    nickname: String,
    title: String,
    coverUrl: String
});

</script>

<style lang="less" scoped>
.wrapper {
    background: #ffffff;
    padding: .2rem .1rem;
    box-sizing: border-box;
    width: 3.5rem;
    border-radius: 5%;
    margin-top: .2rem;

    .coverWrapper {
        position: relative;

        .playIcon {
            color: white;
            position: absolute;
            top: 10%;
            right: 5%;
        }

        img {
            width: 100%;
            border-top-left-radius: 4%;
            border-top-right-radius: 4%;
        }

    }

    .title {
        margin-top: 5px;
        font-size: 10px;
    }

    .bottom {
        display: flex;
        align-items: center;
        justify-content: space-around;

        .avatarWrapper {
            width: 100%;
            margin-top: 5px;
            display: flex;
            align-items: center;

            img {
                width: 20px;
                height: 20px;
                border-radius: 50%;
                margin-right: 2px;
            }

            div {
                font-size: 5px;
                width: 1.5rem;
                overflow: hidden;
                white-space: nowrap;
                text-overflow: ellipsis;
                color: #999999;
            }
        }

        .praisedWrapper {
            font-size: 5px;
            color: #999999;
            min-width: .8rem;
        }
    }
}
</style>
